#!/bin/bash 
# 参考
# http://nickdesaulniers.github.io/blog/2018/10/24/booting-a-custom-linux-kernel-in-qemu-and-debugging-it-with-gdb/

qemu-system-x86_64 \
	-kernel arch/x86_64/boot/bzImage \
	-nographic \
	-append "console=ttyS0 nokaslr" \
	-initrd ramdisk.img \
	-m 2048 \
	--enable-kvm \
	-vga virtio \
	-cpu host \
	-vnc 0.0.0.0:8 \
	-msg timestamp=on \
	-s -S
